const path = require('path');
const process = require('process');
const fs = require('fs');
const {exec} = require('child_process');
process.chdir(process.cwd() + "/txtSymlinks");
exec('cat txtSymlink.txt', function (error,stdout,stderr) {
    if(error){
    }   else{
        console.info('type symlinkSync.txt stdout :');
        console.log(1,stdout);
        console.log(2,stderr);
        // 截取
        let fd = fs.openSync('txtSymlink.txt','r+');
        fs.truncateSync(fd,1)
        console.log(3,fd);
        fs.closeSync(fd);
    }
});
